package gat.api.background.dic;

import com.bitsun.core.common.web.ResultDTO;

import gat.dto.req.dic.DicTypeReqDto;
import gat.dto.res.dic.DicTypeResDto;
import gat.dto.res.dic.DicTypeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

/**
 * 
 * @Author: tmac
 * @Email: tmac
 */
@Api(value = "dicType", description = "字典数据接口", tags = {"字典数据类型"})
public interface BDicTypeApi {



    /**
     * 返回树结构
     *
     * @return 返回新创建的资源对象
     */
    @ApiOperation(value = "返回树结构的字典数据", tags = {"字典数据类型"}, nickname = "getTree")
    @ApiResponses(value = {@ApiResponse(code = 200, message = "000000:成功，否则失败")})
    ResultDTO<DicTypeVo> getTree();

    /**
     * 添加字典数据类型
     *
     * @return 返回新创建的资源对象
     */
    @ApiOperation(value = "添加字典数据类型", tags = {"字典数据类型"}, nickname = "addDicType")
    @ApiResponses(value = {@ApiResponse(code = 200, message = "000000:成功，否则失败")})
    ResultDTO<DicTypeResDto> addDicType(DicTypeReqDto reqDto);

    /**
     * 删除单个或一系列资源对象
     *
     * @param ids 用英文逗号隔开
     * @return 返回一个空文档
     */
    @ApiOperation(value = "删除单个或一系列资源对象", tags = {"字典数据类型",}, nickname = "deleteDicType")
    @ApiResponses(value = {@ApiResponse(code = 200, message = "操作是否成功,000000:成功，否则失败")})
    ResultDTO<Void> deleteDicType(String ids);


    /**
     * 查询一个资源对象
     *
     * @return 返回单独的资源对象
     */
    @ApiOperation(value = "查询一个资源对象", tags = {"字典数据类型"}, nickname = "getOneDicType")
    @ApiResponses(value = {@ApiResponse(code = 200, message = "操作是否成功,000000:成功，否则失败")})
    ResultDTO<DicTypeResDto> getOneDicType(Long id);


    /**
     * 更新一个资源对象(部分更新)
     *
     * @return 返回完整的资源对象
     */
    @ApiOperation(value = "更新一个资源对象(部分更新,更新对象里有值的属性,空值不更新)", tags = {"字典数据类型"}, nickname = "patchUpdateDicType")
    @ApiResponses(value = {@ApiResponse(code = 200, message = "操作是否成功,000000:成功，否则失败")})
    ResultDTO<DicTypeResDto> patchUpdateDicType(Long id, DicTypeReqDto reqDto);

}
